
export const Options = {
    Node: 'Node Server',
    React: 'React Template',
    Cli: 'Cli Template',
    Package: 'Package Template',
    Electron: 'Electron-React-Typescript Template',
}

export const ClonePath = {
    [Options.Node]: 'https://gitee.com/wudongo/node-server-base-on-koa2-type-script.git',
    [Options.React]: 'https://gitee.com/wudongo/react-ts-templater.git',
    [Options.Cli]: 'https://gitee.com/wudongo/template-node-cli.git',
    [Options.Package]: 'https://gitee.com/wudongo/template-npm-package.git',
    [Options.Electron]: 'https://gitee.com/wudongo/wudong-electron-react-ts.git',
}

export const BasePath = {
    Default: '../src/configs/default.json',
    Template: '../src/configs/template.json',
}

export const ProjectRoot = {
    [Options.Node]: `${process.cwd()}/server`,
    [Options.React]: `${process.cwd()}/application`,
    [Options.Cli]: `${process.cwd()}/cli`,
    [Options.Package]: `${process.cwd()}/npm_package`,
    [Options.Electron]: `${process.cwd()}/electron template`,
}
export const DataType = {
    "INT": 'DataTypes.INTEGER',
    "TEXT": "DataTypes.STRING",
    "DATE": "DataTypes.DATE",
    "DATETIME": "DataTypes.DATE",
    "VARCHAR": "DataTypes.CHAR",
    "JSON": "DataTypes.JSON",
}
export const JavaScriptType = {
    "INT": 'number',
    "TEXT": "string",
    "DATE": "string",
    "DATETIME": "string",
    "VARCHAR": "string",
    "JSON": "Record<string, any>",
}
export const SupportedProperties = [
    "type", "primaryKey", "autoIncrement", "unique"
]
export const LegalProperties = [
    "name", "type", "primaryKey", "autoIncrement", "notNull", "default", "unique"
]
export const MysqlCommandProps = {
    primaryKey: 'PRIMARY KEY',
    autoIncrement: 'AUTO_INCREMENT',
    default: 'DEFAULT',
    notNull: 'NOT NULL',
    unique: 'UNIQUE KEY'
}

export const LineBreakType = {
    darwin: '\r',
    win32: '\r\n',
    linux: '\n',
}
export const LineBreak = LineBreakType[process.platform]